package com.run.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.run.merchant.mapper.RunNewsInfoMapper;
import com.run.merchant.domain.RunNewsInfo;
import com.run.merchant.service.IRunNewsInfoService;

/**
 * 校园资讯信息Service业务层处理
 * 
 * @author run
 * @date 2025-05-20
 */
@Service
public class RunNewsInfoServiceImpl implements IRunNewsInfoService 
{
    @Autowired
    private RunNewsInfoMapper runNewsInfoMapper;

    /**
     * 查询校园资讯信息
     * 
     * @param newsId 校园资讯信息主键
     * @return 校园资讯信息
     */
    @Override
    public RunNewsInfo selectRunNewsInfoByNewsId(Long newsId)
    {
        return runNewsInfoMapper.selectRunNewsInfoByNewsId(newsId);
    }

    /**
     * 查询校园资讯信息列表
     * 
     * @param runNewsInfo 校园资讯信息
     * @return 校园资讯信息
     */
    @Override
    public List<RunNewsInfo> selectRunNewsInfoList(RunNewsInfo runNewsInfo)
    {
        return runNewsInfoMapper.selectRunNewsInfoList(runNewsInfo);
    }

    /**
     * 新增校园资讯信息
     * 
     * @param runNewsInfo 校园资讯信息
     * @return 结果
     */
    @Override
    public int insertRunNewsInfo(RunNewsInfo runNewsInfo)
    {
        return runNewsInfoMapper.insertRunNewsInfo(runNewsInfo);
    }

    /**
     * 修改校园资讯信息
     * 
     * @param runNewsInfo 校园资讯信息
     * @return 结果
     */
    @Override
    public int updateRunNewsInfo(RunNewsInfo runNewsInfo)
    {
        return runNewsInfoMapper.updateRunNewsInfo(runNewsInfo);
    }

    /**
     * 批量删除校园资讯信息
     * 
     * @param newsIds 需要删除的校园资讯信息主键
     * @return 结果
     */
    @Override
    public int deleteRunNewsInfoByNewsIds(Long[] newsIds)
    {
        return runNewsInfoMapper.deleteRunNewsInfoByNewsIds(newsIds);
    }

    /**
     * 删除校园资讯信息信息
     * 
     * @param newsId 校园资讯信息主键
     * @return 结果
     */
    @Override
    public int deleteRunNewsInfoByNewsId(Long newsId)
    {
        return runNewsInfoMapper.deleteRunNewsInfoByNewsId(newsId);
    }
}
